package com.cpr.core.rabbitmq.springctl.xml;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;

/**
 * @author Chen Panrui
 * created at 2022/3/15 23:26
 */
public class MyMessageListener implements ChannelAwareMessageListener {
    @Override
    public void onMessage(Message message, Channel channel) throws Exception {
        System.out.println("listener接收到消息:" + new String(message.getBody(),message.getMessageProperties().getContentEncoding()));
    }
}
